<include file="Public:header"/><body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
    <include file="Public:nav"/>
  

    <form name="myform" action="{:U('News/catesort')}" method="post" class="J_ajaxForm">
    <div class="table_list">
        <table width="100%">
            <thead>
            <tr>
                <td width="10%">排序</td>
                <td width="10%">ID</td>
                <td>栏目名称</td>
				<td width="20%" align="center">是否显示</td>
                <td width="20%">管理操作</td>
            </tr>
            </thead>
            <foreach name="newsClass" item="vo">
                <tr>
                    <td><input name="sort" type="text" size="3" value="{$vo.sort}" class="input"></td>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
					<td align="center"><span style="{$vo['style']==1?'':'color:red'}">{$vo['style']==1?'是':'否'}</span></td>
                    <td><a href="{:U('News/classadd',array('id'=>$vo[id],'action'=>'sbut'))}">添加子分类</a> <a href="{:U('News/classedit',array('id'=>$vo[id]))}">修改</a> <a class="J_ajax_del" data-msg="确定删除该类别吗?" href="{:U('News/catedelete',array('cateid'=>$vo['id']))}">删除</a></td>
                </tr>
				<?php $n = (count($vo['son']))-1;?>
				<foreach name="vo['son']" item="val" key="k">
					<tr>
                    <td><input name="sort" type="text" size="3" value="{$val.sort}" class="input"></td>
                    <td>{$val.id}</td>
					<if condition="($k eq $n)">
					<td>&nbsp;&nbsp;&nbsp;└─{$val.name}</td> 
					<else />
					<td>&nbsp;&nbsp;&nbsp;├─{$val.name}</td>
					</if>
                    
					<td align="center"><span style="{$val['style']==1?'':'color:red'}">{$val['style']==1?'是':'否'}</span></td>
                    <td><a href="{:U('News/classedit',array('id'=>$val[id],'action'=>'sbut'))}">修改</a> <a class="J_ajax_del" data-msg="确定删除该类别吗?" href="{:U('News/catedelete',array('cateid'=>$val['id']))}">删除</a></td>
                </tr>
				</foreach>
            </foreach>
        </table>
        
        
    </div>
</div>
</form>
</div>
<script src="__JS__/common.js"></script>
</body>
</html>